package cn.com.nes.mybatis.agent.system.mapper;

import cn.com.nes.mybatis.agent.system.entity.Department;
import cn.com.nes.site.entity.vo.system.DepartmentTreeNodeVO;
import cn.com.nes.site.service.system.company.dto.CompanyTreeNodeDTO;
import cn.com.nes.site.service.system.company.dto.DepartmentTreeNodeDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yishuai
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    List<Department> getChildDepartments(String companyId);


    String getLastChildDepartmentId(String companyId);


    Department getDepartmentUnDelete(String departmentId);


    Department getDepartmentInCompany(@Param("parentId") String parentId,
            @Param("departmentName") String departmentName);


    List<Department> hasChildDepartment(String departmentId);


    List<DepartmentTreeNodeDTO> getTreeNodeList(@Param("vo") DepartmentTreeNodeVO vo);


    List<CompanyTreeNodeDTO> getCompanyTreeNodeList(@Param("companyIds") List<String> companyIds);

}




